home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 6 / CU Amiga Magazine's Super CD-ROM 06 (1996)(EMAP Images)(GB)(Track 1 of 4)[!][issue 1997-01].iso / cucd / prog / mui / modula / doc / muiclasssupport.doc next >
Text File  |  1996-08-14  |  5KB  |  167 lines

  1. TABLE OF CONTENTS
  2.  
  3. MuiClassSupport/---information---
  4. MuiClassSupport/DoSuperNew
  5. MuiClassSupport/InitClass
  6. MuiClassSupport/RemoveClass
  7. MuiClassSupport/setSuper
  8. MuiClassSupport/---information---           MuiClassSupport/---information---
  9.  
  10.    VERSION
  11.         $Id: MuiClassSupport.mod 1.4 1996/08/14 01:39:07 olf Exp olf $
  12.  
  13.    COPYRIGHT
  14.         written and (c) 1996 by Olaf 'Olf' Peters
  15.  
  16.         report bugs, suggestions, comments to
  17.  
  18.           olf@informatik.uni-bremen.de
  19.           op@hb2.maus.de (no mail larger than 16 KB to this address!)
  20.  
  21. MuiClassSupport/DoSuperNew                         MuiClassSupport/DoSuperNew
  22.  
  23.    NAME
  24.         DoSuperNew - create an instance of your superclass.
  25.  
  26.    SYNOPSIS
  27.         DoSuperNew(cl       : IClassPtr;
  28.                    obj      : ObjectPtr ;
  29.                    attrList : TagItemPtr) : ADDRESS ;
  30.  
  31.    FUNCTION
  32.         calls the OM_NEW method for the superclass to create an instance
  33.         of your custom-class. Most likely you will call this in the
  34.         NEW-Method of your customclass.
  35.  
  36.    INPUTS
  37.         cl       - a pointer to a customclass structure, if DoSuperMethod
  38.                    ist called from the NEW method of your customclass, use
  39.                    the ClassPtr you got as parameter for your NEW method.
  40.  
  41.         obj      - also use the ObjectPtr you got as parameter for your
  42.                    NEW method.
  43.  
  44.         attrList - a taglist to set attributes of the superclass your
  45.                    customclass is an instance of.
  46.  
  47.    RESULT
  48.         an instance of your customclass.
  49.  
  50.    SEE ALSO
  51.         amiga.lib/DoSuperMethodA
  52.  
  53. MuiClassSupport/InitClass                           MuiClassSupport/InitClass
  54.  
  55.    NAME
  56.         InitClass -- init MUI-CustomClass structure
  57.  
  58.    SYNOPSIS
  59.         InitClass(VAR mcc        : mCustomClassPtr;
  60.                       base       : LibraryPtr ;
  61.                       supername  : StrPtr ;
  62.                       supermcc   : mCustomClassPtr ;
  63.                       datasize   : LONGINT ;
  64.                       dispatcher : DispatcherDef) : BOOLEAN ;
  65.  
  66.    FUNCTION
  67.         Easily allocate and initialize a MUI-CustomClass structure.
  68.  
  69.         Be sure to call RemoveClass when you're done with the class (most
  70.         likely InitClass() will be called from the startup-code of a
  71.         module whereas RemoveClass will be called from the closing code.)
  72.  
  73.    INPUTS
  74.         mcc        -
  75.  
  76.                      the structure to be initialized. It will also be
  77.                      allocated for you, so be sure to not handle a valid
  78.                      pointer to InitClass(), it will be overwritten!
  79.         base,
  80.         supername,
  81.         supermcc,
  82.         datasize   - see muimaster.library/MUI_CreateCustomClass
  83.         dispatcher - this is the dispatcher function of your customclass,
  84.                      it must match the following prototype:
  85.  
  86.                      PROCEDURE ( (* class   *) id.IClassPtr,
  87.                                  (* object  *) ADDRESS,
  88.                                  (* message *) ADDRESS) : ADDRESS;
  89.  
  90.                      No need to call MakeDispatcher as InitClass does this
  91.                      for you.
  92.  
  93.    RESULT
  94.         TRUE if the initialization was successful, FALSE otherwise
  95.  
  96.    EXAMPLE
  97.         IMPLEMENTATION MODULE TestClass ;
  98.  
  99.         [...]
  100.  
  101.         BEGIN
  102.           IF NOT (InitClass(class1, NIL, ADR(mcPopobject), NIL,
  103.                             SIZE(Class1Data), Class1Dispatcher) AND
  104.                   InitClass(class2, NIL, NIL,              class1,
  105.                             SIZE(Class2Data), Class2Dispatcher)) THEN
  106.             [Fail]
  107.           END ;
  108.         CLOSE
  109.           RemoveClass(class2) ;
  110.           RemoveClass(class1) ;
  111.         END TestClass .
  112.  
  113.         This will create the to classes class1 and class2 where class1 is
  114.         a subclass of mcPopobject and class2 is a subclass of class1.
  115.  
  116.    SEE ALSO
  117.         MuiClassSupport/RemoveClass
  118.         muimaster.library/MUI_CreateCustomClass
  119.  
  120. MuiClassSupport/RemoveClass                       MuiClassSupport/RemoveClass
  121.  
  122.    NAME
  123.         RemoveClass - dispose of a MUI-CustomClass
  124.  
  125.    SYNOPSIS
  126.         RemoveClass(VAR mcc : mCustomClassPtr) ;
  127.  
  128.    FUNCTION
  129.         dispose of aMUI-CustomClass that has been initialised with
  130.         InitClass()
  131.  
  132.    INPUTS
  133.         mcc - the customclass to dispose of, may also be NIL.
  134.  
  135.         Note that this is a VAR parameter, it will be set to NIL after the
  136.         call, so it is safe to call RemoveClass() more often on the same
  137.         structure without any bad results.
  138.  
  139.    SEE ALSO
  140.         MuiClassSupport/InitClass
  141.  
  142. MuiClassSupport/setSuper                             MuiClassSupport/setSuper
  143.  
  144.    NAME
  145.         setSuper -- set attribute of a superclass
  146.  
  147.    SYNOPSIS
  148.         setSuper(cl     : IClassPtr ;
  149.                  obj    : ObjectPtr ;
  150.                  attr   : LONGCARD ;
  151.                  value  : LONGINT) ;
  152.  
  153.    FUNCTION
  154.         Set an attribute of the superclass of an object.
  155.  
  156.    INPUTS
  157.         cl    - pointer to the customclass structure of your class.
  158.         obj   - pointer to the instance of your customclass on which's
  159.                 superclass the attribute should be set.
  160.         attr  - the attribute of your superclass to be set
  161.         value - the attribute value
  162.  
  163.  
  164.    SEE ALSO
  165.         amiga.lib/SetSuperAttrs
  166.  
  167.